//
//  MainViewController.m
//  TT
//
//  Created by lanou3g on 16/3/11.
//  Copyright © 2016年 Super磊. All rights reserved.
//

#import "MainViewController.h"
#import "LogViewController.h"
#import "RegViewController.h"
@interface MainViewController ()

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIImageView *imV =[[UIImageView alloc]initWithFrame:CGRectMake(100, 200, 200, 200)];
    imV.image =[UIImage imageNamed:@"image_default_profile"];
    imV.backgroundColor =[UIColor orangeColor];
    imV.layer.cornerRadius =100;
    imV.layer.masksToBounds =YES;
    [self.view addSubview:imV];
    
    UIButton *Log = [UIButton buttonWithType:(UIButtonTypeSystem)];
    Log.frame = CGRectMake(100, 500, 200, 50);
    [Log setTitle:@"登入" forState:(UIControlStateNormal)];
    [Log addTarget:self action:@selector(LogAction) forControlEvents:(UIControlEventTouchUpInside)];
    Log.backgroundColor =[UIColor grayColor];
    [self.view addSubview:Log];
    
    UIButton *Reg = [UIButton buttonWithType:(UIButtonTypeSystem)];
    Reg.frame = CGRectMake(100, 550, 200, 50);
    [Reg setTitle:@"注册" forState:(UIControlStateNormal)];
    [Reg addTarget:self action:@selector(RegAction) forControlEvents:(UIControlEventTouchUpInside)];
    Reg.backgroundColor =[UIColor orangeColor];
    [self.view addSubview:Reg];
    
    
}

-(void)LogAction {

    LogViewController *log =[LogViewController new];
    [self.navigationController pushViewController:log animated:YES];
    
}
-(void)RegAction {

    RegViewController *reg =[RegViewController new];
    [self.navigationController pushViewController:reg animated:YES];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
